package SwordForOffer.Problem16;

public class Problem16test {
	public static void main(String args[])
	{
		MyNode head=new MyNode();
		MyNode second=new MyNode();
		MyNode third=new MyNode();
		MyNode forth=new MyNode();
		//head.nextNode=second;
		//second.nextNode=third;
		//third.nextNode=forth;
		head.data=1;
		head.nextNode = second;
		second.data=2;
		second.nextNode = third;
		third.data=3;
		third.nextNode = forth;
		forth.data=4;

		MyReverseList test=new MyReverseList();
		MyNode resultListNode = test.reverseListNode(head);
		while (resultListNode.nextNode != null){
			System.out.println(resultListNode.data);
			resultListNode = resultListNode.nextNode;
		}
		System.out.println(resultListNode.data);
	}

}
